package com.SmileBreaker;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;

public class MenuView extends View {

	private MenuActivity activity;
	public MenuView(Context context, AttributeSet attrs) {
		super(context, attrs);
		
		activity = (MenuActivity)context;
	}

	@Override
	protected void onDraw(Canvas canvas) {
		canvas.translate(DisplayInfo.startPaintPoint.getX(), DisplayInfo.startPaintPoint.getY());
		canvas.scale(DisplayInfo.displayRatio, DisplayInfo.displayRatio);
		
		canvas.drawBitmap(activity.getBackground(), 0, 0, null);
		canvas.drawBitmap(activity.getBackground_buttons(), 0, 0, null);
		canvas.drawBitmap(activity.getTitleBitmap(), (int)(-110*DisplayInfo.WHOLE_RATIO), (int)(50*DisplayInfo.WHOLE_RATIO), null);
		
		activity.getBtn_selectStage().Draw(canvas);
		activity.getBtn_state().Draw(canvas);
		
		super.onDraw(canvas);
	}
}
